Sorry, my last post was so short -- I was trying to get out the door to a LUG meeting.
The list tells you every package on your machine & when it was installed, because
/var/lib/dpkg/info/ contains a
.list for each package. Therefore, listing (
ls) the
.list files gives a list of packages. The "-l" option shows the date/time stamps, & "-t" puts the list in time order. From this you should be able to figure out what was upgraded & therefore what to remove to roll back the upgrade.
For example, I just finished running
aptitude safe-upgrade, & this is the beginning of the output of
ls -tl /var/lib/dpkg/info/*.list |less -SN:
Code:
1 -rw-r--r-- 1 root root 7927 2011-01-07 07:15 /var/lib/dpkg/info/dpkg.list
2 -rw-r--r-- 1 root root 17851 2011-01-06 07:11 /var/lib/dpkg/info/openssl.list
3 -rw-r--r-- 1 root root 840 2011-01-06 07:11 /var/lib/dpkg/info/libssl0.9.8.list
Adding
cut &
sed to the command can simplify the output:
Code:
ls -tl /var/lib/dpkg/info/*.list \
| cut -c 31-47,67- \
| sed 's,.list$,,' \
| less -SN
gives:
Code:
1 2011-01-07 07:15 dpkg
2 2011-01-06 07:11 openssl
3 2011-01-06 07:11 libssl0.9.8
You can add some simple formatting to the
sed portion:
Code:
ls -tl /var/lib/dpkg/info/*.list \
| cut -c 31-47,67- \
| sed 's,.list$,,;s, , ,2;s, , ,' \
| less -SN
getting:
Code:
1 2011-01-07 07:15 dpkg
2 2011-01-06 07:11 openssl
3 2011-01-06 07:11 libssl0.9.8
There is a wonderful
awk command that makes a list by day:
Code:
1 2011-01-07 dpkg
2 2011-01-06 openssl
3 libssl0.9.8
Unfortunately, I cannot find that
awk command, in spite of spending a couple of hours searching for it yesterday. Sorry.